package com.mbmed.doctor.medadvice.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.mbmed.doctor.commons.dao.BaseDao;
import com.mbmed.doctor.commons.utils.Utils;

@Repository
public class Restin1Dao extends BaseDao{
	/**
	 * 生成一个主键
	 * @return
	 * @throws Exception
	 */
	public String getPKValue() throws Exception{
		return Utils.getUUID();
	}
	
	public List selectAdviceUndo(String str){
		return getSqlSession().selectList("Restin1.selectAdviceUndo", str);
	}
	
	public boolean toDelRestin(String str){
		if(str == null ) return false;
		try{
			getSqlSession().delete("Restin1.toDelRestin", str);
		}
		catch(Exception e){
			return false;
		}
		return true;
	}
	
}